package org.toonWatch

class Voucher {

   
    
    Double amount
    Date dateIssue
    String transactionId
    //Boolean used 
    static belongsTo= [user:User]
  
    
    static constraints = {
       // voucherCode(nullable:false, unique:true, generate: 'assigned', matches: '[0-9]{8}') //primary key
        amount(nullable:false)
        dateIssue (nullable:false)
        transactionId (nullable:true)
       // used (default:0)
    }

    
}
